package com.baidu.process.utils;



import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;


/**
 * @Auther yinP
 * @Date 2021/9/25
 */
public class GetDateUtils {

    private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("yyyy/MM/dd/HH");

    private static final DateTimeFormatter SDF_MM =  DateTimeFormatter.ofPattern("MM");

    private static final DateTimeFormatter SDF_DD = DateTimeFormatter.ofPattern("dd");


    public static String getYear(){

        LocalDateTime now = LocalDateTime.now();
        return now.format(FORMATTER);
    }

    public static String getMonth(){
        LocalDateTime now = LocalDateTime.now();
        return now.format(SDF_MM);
    }

    public static String getDay(){
        LocalDateTime now = LocalDateTime.now();
        return now.format(SDF_DD);
    }



    public static void main(String[] args) {

        System.out.println(String.format("%s/%s","/Users/yinpeng/Desktop/tmp/0924穿包","xak"));
        getYear();


    }
}
